{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="csrf-token" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <script src="{% static 'js/bootstrap.min.js' %}"></script>
  <script src="{% static 'js/jquery-3.7.1.min.js' %}"></script>
  <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" />
  <link rel="stylesheet" href="{% static 'css/MyLife_CSS.css' %}" />
  <link rel="icon" href="{% static 'images/logo.png' %}">
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <style>
    {% block body_style %}

    body {
      font-family: 'Arial', sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f5f5f5;
      background-image: url('{% static 'images/img.png' %}');
      background-size: cover;
    }

      {% endblock %}
  </style>

  {% block head %}

  {% endblock %}
  <title>
    电影{% block title %}

    {% endblock %}
  </title>
</head>

<body>
  <nav class="navbar navbar-expand-lg fixed-top navbar-light">
    <a href="#" class="btn btn-lg" onclick="goBack()">返回</a>
    <a href="/">
      <img src="{% static 'images/logo.png' %}" alt="header-Logo" height="120px"></a>
    {% if username %}
    <a href="/social/{{ username }}/">社交主页</a>
    {% endif %}
    <a href="/movies/search/">电影搜索</a>
    {% if user_id %}
    <a href="{% url 'movies_recommendations' user_id %}">个性化电影推荐</a>
    {% endif %}
  </nav>
  <br><br><br> <!-- 添加换行，避免导航栏覆盖页面的首行内容 -->
  {% block body %}

  {% endblock %}
  <script>
    // JavaScript 函数，用于返回上一页
    function goBack() {
      window.history.back();
    }
  </script>
</body>

</html>